package il.ac.technion.wiki.api.search;

/**
 * <p>
 * Defines a top-level class for a search-expression tree.
 * </p>
 * <p>
 * The purpose of this class hierarchy is not to match searches on its
 * own. Rather, it is a more explicit way of specifying the search tree
 * that makes it more convenient for data-stores to query the underlying
 * storage appropriately.
 * </p>
 * <p>
 * <i>Note: This interface has no meaning on its own and only exists
 * as a common root for all possible kinds of search expressions.</i>
 * </p>
 */
public interface ISearchExpression {
	/**
	 * Returns the number of operands this search expression requires. Options are:
	 * <ul>
	 * <li>0 operands - The search expression is self-contained.</i>
	 * <li>1 operands - A right-hand side operand is required (e.g.: "not Joe").</i>
	 * <li>2 operands - Both left and rhs operands are required (e.g.: "He and I").</i>
	 * </ul>
	 * @return
	 */
	public int numberOfOperands();
}
